package com.lagou.client;

import com.lagou.service.RpcRequest;
import com.lagou.service.UserService;

public class ClientBootStrap {

//    public static  final String providerName="UserService#sayHello#";
    public static  final RpcRequest rpcRequest= new RpcRequest();

    public static void main(String[] args) throws InterruptedException {

        rpcRequest.setClassName("UserService");
        rpcRequest.setMethodName("sayHello");
        RpcConsumer rpcConsumer = new RpcConsumer();
        UserService proxy = (UserService) rpcConsumer.createProxy(UserService.class, rpcRequest);

        while (true){
            Thread.sleep(2000);
            System.out.println(proxy.sayHello("are you ok?"));
        }


    }




}
